#ifndef ANIMATIONVIEW_H
#define ANIMATIONVIEW_H

#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <SFML/Graphics.hpp>

#include "pugixml/pugixml.hpp"
#include "animation_set.hpp"

class AnimationView {

public:
	AnimationView();
	void Initialize(int argc, const char ** argv);
	void Initialize(const char* file_name);
	
	void Update(float dt);
	void Render(sf::RenderWindow& window) const;
	
	int GetWidht() const {return m_width;}
	int GetHeight() const {return m_height;}
	
	~AnimationView();
private:
	static std::string ExtractAnimDirPath(const char* file_name);
	void Initialize(const pugi::xml_document& document);
	void Clear();
	std::string m_anim_dir_path;
	AnimationSet m_animation_set;
	int m_width;
	int m_height;
	float m_time_from_start;
};

#endif // ANIMATIONVIEW_H
